//
//  AppDelegate+DTCRootController.m
//  BluetoothProject
//
//  Created by Kendama Chen on 17/8/16.
//  Copyright © 2017年 Kendama. All rights reserved.
//

#import "AppDelegate+DTCRootController.h"
#import "LoginViewController.h"
#import "HomeViewController.h"
#import "MainSlideViewController.h"

@interface AppDelegate ()

@end



@implementation AppDelegate (DTCRootController)

- (void)setRootViewController
{
    if ([EXRACT_OBJECT(LOGIN) isEqualToString:@"YES"]) {
        MainSlideViewController *sliderVC = [[MainSlideViewController alloc]init];
        sliderVC.rootViewController = [[HomeViewController alloc]init];
        [sliderVC setupSlideStyle];
        UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:sliderVC];
        [nav.navigationBar setHidden:YES];
        self.window.rootViewController = nav;
    } else {
        LoginViewController *loginVC = [[LoginViewController alloc] init];
        UINavigationController *navc = [[UINavigationController alloc]initWithRootViewController:loginVC];
        self.window.rootViewController = navc;
    }
    [self.window makeKeyAndVisible];

}

- (void)userLogout
{
 
}
@end
